package cn.fly.springbucks.support;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.io.Serializable;

@AllArgsConstructor
@Data
public class ResponseMsg implements Serializable {
    int code;
    Object data;

    public static ResponseMsg success(Object object){
        return new ResponseMsg(200,object);
    }

    public static ResponseMsg error(Object object){
        return new ResponseMsg(400,object);
    }
}
